<html><head>
   <title>Debugging Django Applications</title>
   <meta name="generator"  content="HelpMaker.net">
   <meta name="keywords"  content="django,Python engines,Remote debuggingRunning scripts"></head>
<body bgcolor="#FFFCEA">
<table width="100%"  border="0"  cellspacing="0"  cellpadding="2"  bgcolor="#C0C0C0">
  <tr>
    <td align="left">
      <div align="left"><font face="Arial"  color="#010101"  size="4"><span style=" font-size:14pt; font-family:Arial; color:#010101">Debugging Django Applications</span></font></div>

    </td>
    <td align="right">
      <font face="Arial"  size="2">
        <a href="usingmatplotlib.htm">Previous</a>&nbsp;<a href="pyscripter.htm">Top</a>&nbsp;<a href="commandline.htm">Next</a>
      </font>
    </td>
  </tr></table>
<hr><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">Here is how you can debug </span></font><a href="http://www.djangoproject.com/"><font face="Arial"  color="#0000ff"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#0000ff"><u>Django</u></span></font></a><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"> applications with Pyscripter in six simple steps.</span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><br></span></font></div><div align="left"  style="margin-left:6mm; margin-right:0mm; text-indent:-6mm; margin-top:0.00mm; margin-bottom:0.00mm;"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">1.&nbsp; &nbsp;In the File explorer locate the root directory of your Django application.&nbsp; You may want 
to right 
click on the directory name and select File Explorer, Explore here.</span></font></div><div align="left"  style="margin-left:6mm; margin-right:0mm; text-indent:-6mm; margin-top:0.00mm; margin-bottom:0.00mm;"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">2.&nbsp; &nbsp;Open the project files in Pyscripter (e.g., models,py, views.py etc.) and set whatever 
breakpoints you want.</span></font></div><div align="left"  style="margin-left:6mm; margin-right:0mm; text-indent:-6mm; margin-top:0.00mm; margin-bottom:0.00mm;"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">3.&nbsp; &nbsp;Select Run, Command Line Parameters... and set the command line to &quot;runserver --noreload&quot;.&nbsp; 
Also check the &quot;Use Command line&quot; checkbox.</span></font></div><div align="left"  style="margin-left:6mm; margin-right:0mm; text-indent:-6mm; margin-top:0.00mm; margin-bottom:0.00mm;"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">4.&nbsp; &nbsp;Make sure the remote engine is selected (Run, Python Engine, Remote).</span></font></div><div align="left"  style="margin-left:6mm; margin-right:0mm; text-indent:-6mm; margin-top:0.00mm; margin-bottom:0.00mm;"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">5.&nbsp; &nbsp;Open the manage.py file and press the debug button (or press F9).</span></font></div><div align="left"  style="margin-left:6mm; margin-right:0mm; text-indent:-6mm; margin-top:0.00mm; margin-bottom:0.00mm;"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">6.&nbsp; &nbsp;Start a web browser and test your application.&nbsp;&nbsp; Pyscripter should now stop at whatever 
breakpoints you have set and you can use the various debugging facilities (call stack, 
variables, interpreter prompt etc.)</span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><br></span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">To stop debugging, right-click on the interpreter window and select &quot;Reinitialize Interpreter&quot;, then 
go to the browser and reload the document.</span></font></div>

</body></html>
